% Run the "Squares Task" demo for Snow Dots
clear
clear classes

% choose how to draw graphics (locally or remotely)
%   configure all the objectes needed for the Squares Task
dotsTheDrawablesManager.reset('serverMode', false, 'clientMode', false);
[squaresTree, squaresList] = configureSquaresTask;

% optionally view the task structure
%squaresTree.gui;

%%
try
    % run() the top-level topsRunnable to execute the Squares Task
    squaresTree.run;
    
catch err
    % let the local OpenGL drawing window close, if necessary
    dotsTheScreen.reset;
    rethrow(err)
end